package cn.yujian95.hospital.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Mybatis 配置类
 *
 * @author YuJian95  clj9509@163.com
 * @date 2020/1/19
 */


@EnableTransactionManagement
@Configuration
public class MybatisConfig {

    /**
     * 配置分页插件
     *
     * @return
     */
    @Bean // 成为bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
